package com.kaizen.messagehandler;

import com.kaizen.dispatcher.MessageHandler;
import com.kaizen.message.auth.AuthResponse;
import io.netty.channel.Channel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * 处理服务端的认证响应
 */
@Component
public class AuthResponseHandler implements MessageHandler<AuthResponse> {

    private Logger logger = LoggerFactory.getLogger(getClass());


    @Override
    public void execute(Channel channel, AuthResponse message) {
        // 这里应该记录一些日志 或者记录下ip什么的
        logger.info("[execute][认证结果：{}]", message);

    }

    @Override
    public String getType() {
        return AuthResponse.TYPE;
    }
}
